{#
Copyright (c) 2020 Andy Zhou
MIT License
#}
{% extends 'base.html' %}
{% from 'macros.html' import post_actions with context %}
{% block title %}{{ _("Your collections") }}{% endblock %}
{% block page_content %}
    <div class="row">
        <div class="col-md-8">
            <ul class="list-group">
                {% if posts | length > 0 %}
                    {% for post in posts %}
                        <li class="list-group-item">
                            <h3 class="text-primary"><a href="{{ url_for('main.full_post', id=post.id) }}">{{ post.title }}</a></h3>
                            <div>
                                {{ post.content | striptags | truncate(200) }}
                                <small class="text-primary">
                                    <a href="{{ url_for('main.full_post', id=post.id) }}">{{ _("Read More") }}</a>
                                </small>
                            </div>
                            {{ post_actions(post) }}
                        </li>
                    {% endfor %}
                {% else %}
                    {{ _("There are no picked posts.") }}
                {% endif %}
            </ul>
        </div>
        {% include 'main/_sidebar.html' %}
    </div>
{% endblock page_content %}
